public class Numbers
{
   /**
      Counts the number of perfect squares in a given range
      @param a the lower bound of the range
      @param b the upper bound of the range
      @return the number of perfect squares in the range [a,b] (including the bounds)
   */
   public int countPerfectSquares(int a, int b)
   {
      // your work here
      int n=0;
      
      int t=0;
      for(int i=a;i<=b;i++) {
         while(t*t<=i) {
            if(t*t==i) {
               t++;
               n++;
               break;
            }
            t++;
         }
      }
   
      return n;
   
   
   
   }
}